﻿using System.Net.Sockets;
using System.Windows.Forms;

namespace NetworkFileShare {

    public partial class MainClientForm : Form {

        string hostname;
        int port;

        internal const string SuccessfulConnectionText = "Connected";

        internal string ApplicationName {
            get { return this.Name; }
        }

        internal string ConnectionStatusName {
            get { return ConnectionStatus.Name; }
        }

        public MainClientForm(string hostname, int port) {
            InitializeComponent();
            this.hostname = hostname;
            this.port = port;
        }

        private void OnLoad(object sender, System.EventArgs e) {
            new TcpClient(hostname, port);
            ConnectionStatus.Text = SuccessfulConnectionText;
        }

    }

}
